/*
 * Created by LiuYou on 2020/11/13.
 *
 */

#ifndef EFFECTIVECPP_CPU_HPP
#define EFFECTIVECPP_CPU_HPP


#include <string>
#include <ostream>

namespace computer {


    class Cpu {
    public:
        friend std::ostream& operator<<(std::ostream& os, const Cpu& cpu);

        virtual const std::string& getCpuFeature() const {
            return cpuFeature;
        }

        virtual void setCpuFeature(const std::string& cpuFeature) {
            Cpu::cpuFeature = cpuFeature;
        }

        explicit Cpu(const std::string& cpuFeature) : cpuFeature(cpuFeature) {}

        virtual ~Cpu() = default;

    private:
        std::string cpuFeature;

    };

    std::ostream& operator<<(std::ostream& os, const Cpu& cpu) {
        os << "cpuFeature: " << cpu.cpuFeature;
        return os;
    }

}


#endif //EFFECTIVECPP_CPU_HPP
